﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DisputeDetail.aspx.cs" Inherits="UI_Mail_DisputeDetail" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head runat="server">
    <title>纠纷</title>
    <link href="../../js/jquery.easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../../js/jquery.easyui/themes/icon.css" rel="stylesheet" type="text/css" />
    <script src="../../js/jquery.easyui/jquery.min.js" type="text/javascript"></script>
    <script src="../../js/jquery.easyui/jquery.easyui.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="http://www.jeasyui.com/easyui/datagrid-detailview.js"></script>
    <script type="text/javascript">
      $(document).ready(function() {
        var orderID = request.QueryString('orderid');
        var eBayUserID = request.QueryString('ebayuserid');
       $('#dispute').datagrid({
         view: detailview,
         url: '../../TableHanders.aspx?act=q&tid=8005&type=0',
         queryParams: { 'orderid': orderID, 'ebayuserid': eBayUserID },
         columns: [[
           { field: 'CaseID', title: 'Case ID' },
           { field: 'Title', title: '标题' },
           { field: 'BuyerID', title: '买家ID' },
           { field: 'ItemID', title: 'ItemID' },
           { field: 'DisputeDate', title: '纠纷日期' },
           { field: 'Status', title: '状态' }
         ]],
         detailFormatter: function (index, row) {
           return '<div id="ddv-' + index + '" class="ddv" style="padding:5px 0"></div>';
         },
         onExpandRow: function (index, row) {
           var ddv = $(this).datagrid('getRowDetail', index).find('div#ddv-' + index);
           var caseID = row['CaseID'];
           ddv.panel({
             height: 500,
             border: false,
             cache: false,
             href: './GetDisputeDetail.aspx?ebayuserid=' + eBayUserID + '&caseid=' + caseID + '&index=' + index,
             onLoad: function () {
               $('#dispute').datagrid('fixDetailRowHeight', index);
             }
           });
           $('#dispute').datagrid('fixDetailRowHeight', index);
         }
       });
     });
     var request = {
       QueryString : function(val) {
         var url = window.location.search;
         var re = new RegExp('' +val+ '=([^&?]*)', 'ig');
         return ((url.match(re))?(url.match(re)[0].substr(val.length+1)):null);
       }
     };
    </script>
  </head>
  <body>
    <form>
      <div>
        <table id="dispute"></table>
      </div>
    </form>
  </body>
</html>
